using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using TaugeLibrary.Interfaces;
using TaugeStock.BusinessUnit.Master.Store;


namespace TaugeStock
{
    public class App:ITaugeApplication
    {
        public static ITaugeFramework Framework = null;
        

        public App()
        {
        }

        
        public void miTest_Click(object sender, System.EventArgs e)
        {
            //Framework.ShowBusinessUnitForm(new UserAccountManager());
        }

        public void miStore_Click(object sender, System.EventArgs e)
        {
            Framework.ShowBusinessUnitListForm( new StoreManager());
        }

        #region ITaugeApplication Members

        public ToolStripMenuItem[] getMenu()
        {
            ToolStripMenuItem miMaster = new ToolStripMenuItem("Master");
            ToolStripMenuItem miTransaction = new ToolStripMenuItem("Transaction");
            ToolStripMenuItem miReport = new ToolStripMenuItem("Report");
            ToolStripMenuItem miTest = new ToolStripMenuItem("Test");
            miTest.Click += new System.EventHandler(this.miTest_Click);


            miMaster.DropDownItems.Add("Toko",null,new System.EventHandler(this.miStore_Click));


            ToolStripMenuItem[] miAll = new ToolStripMenuItem[4];
            miAll[0] = miMaster;
            miAll[1] = miTransaction;
            miAll[2] = miReport;
            miAll[3] = miTest;
            return miAll;

        }

        public void setFramework(ITaugeFramework p_framework)
        {
            App.Framework = p_framework;
        }

        #endregion
    }
}
